﻿using Huirui.Cavan.Domain.Seedwork;
using System;
using System.Collections;
using Huirui.Cavan.Domain.MainBoundedContext.SystemModule;

namespace Huirui.Cavan.Domain.MainBoundedContext.StockModule
{
    #region StockInDetail

    /// <summary>
    /// StockInDetail object for NHibernate mapped table 'StockInDetail'.
    /// </summary>
    [Serializable]
    public class StockInOutDetail : Persistent<long>
    {
        #region Member Variables

        protected Account _fromAccount;
        protected decimal _number;
        protected decimal _leftNumber;
        protected decimal _unitCost;
        protected StockIdentifier.CostType _costType;
        protected decimal _cost;
        protected decimal _taxRate;
        protected decimal _discountRate;
        protected string _description;
        protected Stock _stock;
        protected StockInOut _stockIn;
        protected WareHouse _wareHouse;

        #endregion

        #region Constructors

        public StockInOutDetail() { }

        public StockInOutDetail(Account fromAccount, decimal number, decimal unitCost, StockIdentifier.CostType costType, decimal cost, decimal taxRate, decimal discountRate, string description, DateTime createDate, DateTime modifyDate, int editUser, Stock stock, WareHouse wareHouse)
        {
            this._fromAccount = fromAccount;
            this._number = number;
            this._leftNumber = number;
            this._unitCost = unitCost;
            this._costType = costType;
            this._cost = cost;
            this._description = description;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._stock = stock;
            this._wareHouse = wareHouse;
            this._taxRate = taxRate;
            this._discountRate = discountRate;
        }

        #endregion

        #region Public Properties


        public virtual Account FromAccount
        {
            get { return _fromAccount; }
            set
            {
                _fromAccount = value;
            }
        }

        public virtual decimal Number
        {
            get { return _number; }
            set { _number = value; }
        }

        public virtual decimal LeftNumber
        {
            get { return _leftNumber; }
            set { _leftNumber = value; }
        }

        public virtual decimal UnitCost
        {
            get { return _unitCost; }
            set { _unitCost = value; }
        }

        public virtual StockIdentifier.CostType CostType
        {
            get { return _costType; }
            set { _costType = value; }
        }

        public virtual decimal Cost
        {
            get { return _cost; }
            set { _cost = value; }
        }

        public virtual decimal TaxRate
        {
            get { return _taxRate; }
            set { _taxRate = value; }
        }

        public virtual decimal DiscountRate
        {
            get { return _discountRate; }
            set { _discountRate = value; }
        }

        public virtual string Description
        {
            get { return _description; }
            set
            {
                _description = value;
            }
        }

        public virtual Stock Stock
        {
            get { return _stock; }
            set { _stock = value; }
        }

        public virtual StockInOut StockIn
        {
            get { return _stockIn; }
            set { _stockIn = value; }
        }

        public virtual WareHouse WareHouse
        {
            get { return _wareHouse; }
            set { _wareHouse = value; }
        }
        #endregion
    }
    #endregion
}